package com.openharmony.filepicker.filetype;


import com.openharmony.filepicker.ResourceTable;

public class DataBaseFileType extends FileType {

    public DataBaseFileType() {
        this.setFileType("DataBase");
        this.setFileIconResId(ResourceTable.Media_ic_unknown_file_picker);
    }

    @Override
    public boolean verify(String fileName) {
        boolean isHasSuffix = fileName.contains(".");
        if (!isHasSuffix) {
            return false;
        }
        String suffix = fileName.substring(fileName.lastIndexOf(".") + 1);

        switch (suffix) {
            case "accdb":
            case "db":
            case "dbf":
            case "mdb":
            case "pdb":
            case "sql":
                return true;
            default:
                return false;
        }
    }
}
